package com.haiheng.voiceandbook.treeview.viewholder;

import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.annotation.TargetApi;
import android.os.Build;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.view.animation.DecelerateInterpolator;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.haiheng.voiceandbook.R;
import com.haiheng.voiceandbook.common.DocDto;
import com.haiheng.voiceandbook.treeview.interfaces.ItemDataClickListener;


import java.util.List;


/**
 * @Author Zheng Haibo
 * @PersonalWebsite http://www.mobctrl.net
 * @Description
 */
public class ParentViewHolder extends BaseViewHolder {


    public TextView text;

    public LinearLayout relativeLayout;


    public ParentViewHolder(View itemView) {
        super(itemView);

        text = (TextView) itemView.findViewById(R.id.title);
        relativeLayout = (LinearLayout) itemView.findViewById(R.id.container);

    }

    private static final String TAG = "ParentViewHolder";

    public void bindView(final DocDto itemData, final int position,
                         final ItemDataClickListener imageClickListener) {

        text.setText(itemData.getTitle());

        relativeLayout.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View view) {
                imageClickListener.onCilick(itemData);
            }
        });
    }


}
